# 基础镜像使用java
FROM harbor.eniot.io/envisioniot/java8:latest

# 定义环境变量
ENV APP_NAME fc
ENV APP_DIR /apps/$APP_NAME

# 指定工作目录
WORKDIR $APP_DIR

# 挂载的容器磁盘 tmp tomcat 自动创建目录 ,启动时需要映射具体的位置 fc 下面包括 config  log
VOLUME ["/tmp","/apps","/fc"]
# docker run -p 8080:8080 -v /home/envision/fc:/apps/fc harbor.eniot.io/fc/site-sequence

# docker对外暴露端口，需要启动时映射进来
EXPOSE 8080

# 将jar包添加到容器中并更名为 项目.jar
COPY ./factdata-sync*[^sources].jar $APP_DIR/factdata-sync.jar
# 将jar包添加到容器中并更名为 项目.jar
COPY ./site-sequence*[^sources].jar $APP_DIR/site-sequence.jar
# 拷贝执行脚本
COPY startup.sh $APP_DIR/

# 运行jar包
#ENTRYPOINT ["java","-jar","-Xms256M","-Xmx256M","-XX:PermSize=16M","-XX:MaxPermSize=128M","-Xss512k","factdata-sync.jar"]
#ENTRYPOINT ["java","-jar","-Xms256M","-Xmx256M","-XX:PermSize=16M","-XX:MaxPermSize=128M","-Xss512k","site-sequence.jar"]
# 指定容器启动程序及参数
ENTRYPOINT ["sh","./startup.sh"]